home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 117
/
FreelogNo117-OctobreNovembre2013.iso
/
Programmation
/
jedit
/
jedit5.1.0install.exe
/
{app}
/
macros
/
Emacs
/
Emacs_Insert_File.bsh
< prev
next >
Wrap
Text File
|
2013-07-28
|
569b
|
22 lines
/**
* Insert the contents of a file at the caret. Emulates the Emacs
* "insert-file" command (normally bound to "Ctrl-X i").
*/
source (MiscUtilities.constructPath(dirname(scriptPath), "EmacsUtil.bsh"));
void emacsInsertFile()
{
caret = textArea.getCaretPosition();
path = buffer.getPath();
if (path == null)
path = ".";
else
path = dirname (path);
result = GUIUtilities.showVFSFileDialog(view, path, VFSBrowser.OPEN_DIALOG, false);
if (result != null)
buffer.insertFile (view, result[0]);
}
emacsInsertFile();